16#ifndef AOM_AOM_AOM_IMAGE_H_
17#define AOM_AOM_AOM_IMAGE_H_
23#include "aom/aom_integer.h"
33#define AOM_IMAGE_ABI_VERSION (9)
35#define AOM_IMG_FMT_PLANAR 0x100
36#define AOM_IMG_FMT_UV_FLIP 0x200
38#define AOM_IMG_FMT_HIGHBITDEPTH 0x800
62#define AOM_HAVE_IMG_FMT_NV12 1
238#define AOM_PLANE_PACKED 0
296 unsigned int d_w,
unsigned int d_h,
353 unsigned int d_h,
unsigned int stride_align,
354 unsigned char *img_data);
383 unsigned int d_w,
unsigned int d_h,
385 unsigned int size_align,
386 unsigned int border);
404 unsigned int w,
unsigned int h,
unsigned int border);
aom_metadata_insert_flags
List of insert flags for Metadata.
Definition aom_image.h:187
@ AOM_MIF_KEY_FRAME
Definition aom_image.h:189
@ AOM_MIF_ANY_FRAME
Definition aom_image.h:190
@ AOM_MIF_ANY_FRAME_LAYER_SPECIFIC
Definition aom_image.h:196
@ AOM_MIF_NON_KEY_FRAME
Definition aom_image.h:188
@ AOM_MIF_KEY_FRAME_LAYER_SPECIFIC
Definition aom_image.h:194
@ AOM_MIF_NON_KEY_FRAME_LAYER_SPECIFIC
Definition aom_image.h:192
int aom_img_set_rect(aom_image_t *img, unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned int border)
Set the rectangle identifying the displayed portion of the image.
enum aom_metadata_insert_flags aom_metadata_insert_flags_t
List of insert flags for Metadata.
aom_chroma_sample_position
List of chroma sample positions.
Definition aom_image.h:155
@ AOM_CSP_COLOCATED
Definition aom_image.h:159
@ AOM_CSP_UNKNOWN
Definition aom_image.h:156
@ AOM_CSP_RESERVED
Definition aom_image.h:160
@ AOM_CSP_VERTICAL
Definition aom_image.h:157
aom_image_t * aom_img_alloc_with_border(aom_image_t *img, aom_img_fmt_t fmt, unsigned int d_w, unsigned int d_h, unsigned int align, unsigned int size_align, unsigned int border)
Open a descriptor, allocating storage for the underlying image with a border.
void aom_img_flip(aom_image_t *img)
Flip the image vertically (top for bottom).
enum aom_chroma_sample_position aom_chroma_sample_position_t
List of chroma sample positions.
aom_transfer_characteristics
List of supported transfer functions.
Definition aom_image.h:93
@ AOM_CICP_TC_BT_2020_10_BIT
Definition aom_image.h:109
@ AOM_CICP_TC_RESERVED_19
Definition aom_image.h:114
@ AOM_CICP_TC_RESERVED_0
Definition aom_image.h:94
@ AOM_CICP_TC_BT_470_M
Definition aom_image.h:98
@ AOM_CICP_TC_HLG
Definition aom_image.h:113
@ AOM_CICP_TC_SMPTE_428
Definition aom_image.h:112
@ AOM_CICP_TC_RESERVED_3
Definition aom_image.h:97
@ AOM_CICP_TC_LOG_100
Definition aom_image.h:103
@ AOM_CICP_TC_IEC_61966
Definition aom_image.h:106
@ AOM_CICP_TC_BT_601
Definition aom_image.h:100
@ AOM_CICP_TC_BT_470_B_G
Definition aom_image.h:99
@ AOM_CICP_TC_LOG_100_SQRT10
Definition aom_image.h:104
@ AOM_CICP_TC_UNSPECIFIED
Definition aom_image.h:96
@ AOM_CICP_TC_SRGB
Definition aom_image.h:108
@ AOM_CICP_TC_LINEAR
Definition aom_image.h:102
@ AOM_CICP_TC_SMPTE_2084
Definition aom_image.h:111
@ AOM_CICP_TC_SMPTE_240
Definition aom_image.h:101
@ AOM_CICP_TC_BT_1361
Definition aom_image.h:107
@ AOM_CICP_TC_BT_2020_12_BIT
Definition aom_image.h:110
@ AOM_CICP_TC_BT_709
Definition aom_image.h:95
struct aom_metadata_array aom_metadata_array_t
Array of aom_metadata structs for an image.
Definition aom_image.h:200
enum aom_transfer_characteristics aom_transfer_characteristics_t
List of supported transfer functions.
aom_image_t * aom_img_wrap(aom_image_t *img, aom_img_fmt_t fmt, unsigned int d_w, unsigned int d_h, unsigned int stride_align, unsigned char *img_data)
Open a descriptor, using existing storage for the underlying image.
aom_color_primaries
List of supported color primaries.
Definition aom_image.h:72
@ AOM_CICP_CP_UNSPECIFIED
Definition aom_image.h:75
@ AOM_CICP_CP_SMPTE_240
Definition aom_image.h:80
@ AOM_CICP_CP_SMPTE_432
Definition aom_image.h:86
@ AOM_CICP_CP_RESERVED_23
Definition aom_image.h:89
@ AOM_CICP_CP_BT_601
Definition aom_image.h:79
@ AOM_CICP_CP_RESERVED_13
Definition aom_image.h:87
@ AOM_CICP_CP_SMPTE_431
Definition aom_image.h:85
@ AOM_CICP_CP_BT_470_M
Definition aom_image.h:77
@ AOM_CICP_CP_XYZ
Definition aom_image.h:84
@ AOM_CICP_CP_BT_2020
Definition aom_image.h:83
@ AOM_CICP_CP_RESERVED_0
Definition aom_image.h:73
@ AOM_CICP_CP_BT_470_B_G
Definition aom_image.h:78
@ AOM_CICP_CP_GENERIC_FILM
Definition aom_image.h:81
@ AOM_CICP_CP_BT_709
Definition aom_image.h:74
@ AOM_CICP_CP_EBU_3213
Definition aom_image.h:88
@ AOM_CICP_CP_RESERVED_3
Definition aom_image.h:76
enum aom_color_range aom_color_range_t
List of supported color range.
#define AOM_IMG_FMT_HIGHBITDEPTH
Definition aom_image.h:38
aom_image_t * aom_img_alloc(aom_image_t *img, aom_img_fmt_t fmt, unsigned int d_w, unsigned int d_h, unsigned int align)
Open a descriptor, allocating storage for the underlying image.
aom_matrix_coefficients
List of supported matrix coefficients.
Definition aom_image.h:119
@ AOM_CICP_MC_IPT_C2
Definition aom_image.h:138
@ AOM_CICP_MC_UNSPECIFIED
Definition aom_image.h:122
@ AOM_CICP_MC_BT_601
Definition aom_image.h:126
@ AOM_CICP_MC_IDENTITY
Definition aom_image.h:120
@ AOM_CICP_MC_RESERVED_15
Definition aom_image.h:137
@ AOM_CICP_MC_CHROMAT_NCL
Definition aom_image.h:133
@ AOM_CICP_MC_BT_2020_CL
Definition aom_image.h:131
@ AOM_CICP_MC_SMPTE_2085
Definition aom_image.h:132
@ AOM_CICP_MC_SMPTE_240
Definition aom_image.h:127
@ AOM_CICP_MC_YCGCO_RE
Definition aom_image.h:139
@ AOM_CICP_MC_RESERVED_3
Definition aom_image.h:123
@ AOM_CICP_MC_ICTCP
Definition aom_image.h:136
@ AOM_CICP_MC_SMPTE_YCGCO
Definition aom_image.h:128
@ AOM_CICP_MC_CHROMAT_CL
Definition aom_image.h:135
@ AOM_CICP_MC_BT_709
Definition aom_image.h:121
@ AOM_CICP_MC_YCGCO_RO
Definition aom_image.h:140
@ AOM_CICP_MC_BT_2020_NCL
Definition aom_image.h:129
@ AOM_CICP_MC_FCC
Definition aom_image.h:124
@ AOM_CICP_MC_BT_470_B_G
Definition aom_image.h:125
size_t aom_img_num_metadata(const aom_image_t *img)
Return the number of metadata blocks within the image.
#define AOM_IMG_FMT_PLANAR
Definition aom_image.h:35
void aom_img_remove_metadata(aom_image_t *img)
Remove metadata from image.
enum aom_color_primaries aom_color_primaries_t
List of supported color primaries.
aom_img_fmt
List of supported image formats.
Definition aom_image.h:41
@ AOM_IMG_FMT_I42216
Definition aom_image.h:67
@ AOM_IMG_FMT_I42016
Definition aom_image.h:65
@ AOM_IMG_FMT_AOMI420
Definition aom_image.h:57
@ AOM_IMG_FMT_YV1216
Definition aom_image.h:66
@ AOM_IMG_FMT_I444
Definition aom_image.h:59
@ AOM_IMG_FMT_I422
Definition aom_image.h:58
@ AOM_IMG_FMT_I44416
Definition aom_image.h:68
@ AOM_IMG_FMT_I420
Definition aom_image.h:45
@ AOM_IMG_FMT_NV12
Definition aom_image.h:63
@ AOM_IMG_FMT_YV12
Definition aom_image.h:43
@ AOM_IMG_FMT_AOMYV12
Definition aom_image.h:51
const aom_metadata_t * aom_img_get_metadata(const aom_image_t *img, size_t index)
Return a metadata payload stored within the image metadata array.
enum aom_matrix_coefficients aom_matrix_coefficients_t
List of supported matrix coefficients.
enum aom_img_fmt aom_img_fmt_t
List of supported image formats.
struct aom_metadata aom_metadata_t
Metadata payload.
int aom_img_plane_height(const aom_image_t *img, int plane)
Get the height of a plane.
void aom_img_metadata_free(aom_metadata_t *metadata)
Free metadata struct.
aom_metadata_t * aom_img_metadata_alloc(uint32_t type, const uint8_t *data, size_t sz, aom_metadata_insert_flags_t insert_flag)
Allocate memory for aom_metadata struct.
int aom_img_add_metadata(aom_image_t *img, uint32_t type, const uint8_t *data, size_t sz, aom_metadata_insert_flags_t insert_flag)
Add metadata to image.
aom_color_range
List of supported color range.
Definition aom_image.h:145
@ AOM_CR_STUDIO_RANGE
Definition aom_image.h:146
@ AOM_CR_FULL_RANGE
Definition aom_image.h:149
int aom_img_plane_width(const aom_image_t *img, int plane)
Get the width of a plane.
#define AOM_IMG_FMT_UV_FLIP
Definition aom_image.h:36
struct aom_image aom_image_t
Image Descriptor.
void aom_img_free(aom_image_t *img)
Close an image descriptor.
Image Descriptor.
Definition aom_image.h:211
int temporal_id
Definition aom_image.h:255
int spatial_id
Definition aom_image.h:256
unsigned int h
Definition aom_image.h:222
unsigned int bit_depth
Definition aom_image.h:223
aom_matrix_coefficients_t mc
Definition aom_image.h:215
aom_chroma_sample_position_t csp
Definition aom_image.h:217
void * user_priv
The following member may be set by the application to associate data with this image.
Definition aom_image.h:261
unsigned int y_chroma_shift
Definition aom_image.h:235
unsigned int w
Definition aom_image.h:221
aom_img_fmt_t fmt
Definition aom_image.h:212
int stride[3]
Definition aom_image.h:250
unsigned char * img_data
Definition aom_image.h:264
unsigned int x_chroma_shift
Definition aom_image.h:234
unsigned int d_w
Definition aom_image.h:226
int bps
Definition aom_image.h:253
unsigned int r_w
Definition aom_image.h:230
aom_transfer_characteristics_t tc
Definition aom_image.h:214
unsigned int r_h
Definition aom_image.h:231
void * fb_priv
Definition aom_image.h:271
int monochrome
Definition aom_image.h:216
unsigned int d_h
Definition aom_image.h:227
aom_color_range_t range
Definition aom_image.h:218
unsigned char * planes[3]
Definition aom_image.h:244
int img_data_owner
Definition aom_image.h:265
int self_allocd
Definition aom_image.h:266
aom_color_primaries_t cp
Definition aom_image.h:213
size_t sz
Definition aom_image.h:251
aom_metadata_array_t * metadata
Definition aom_image.h:269